<?php
/**
 * Created by IDEA.
 * User: dinesh
 * Date: Apr 11, 2012
 * Time: 5:36:54 PM
 * To change this template use File | Settings | File Templates.
 */

class HomeController extends BaseController {
    public function action() {
        $this->message = "controller message";
        $this->render('main');
    }

    public function actionMain() {
        $this->render('main');
    }

    // menu load test method
    //test path = http://localhost/idea/aea/index.php?home/loadMenu&action=loadMenu
    public function actionLoadMenu() {
        $menu = new Menu();
        switch (@$_GET["action"]) {
            case "loadMenu":
                $menuItem = $menu->get_menu_xml(@$_GET["parentId"], @$_GET["topId"]);
                $this->renderPartial('menu', array('model' => $menuItem,));
                break;
        }

    }
}
